package com.apartment.own.domain;

import com.apartment.common.annotation.Excel;
import com.apartment.own.domain.group.InsertMode;
import com.apartment.own.domain.group.UpdateMode;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.apartment.common.core.domain.BaseEntity;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 【请填写功能名称】对象 test_student
 * 
 * @author @Dog_E
 * @date 2020-08-31
 */
@Data
@ApiModel("【请填写功能名称】")
public class TestStudent extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @ApiModelProperty("id")

    @NotNull(message = "id不能为空" ,groups = {UpdateMode.class})
    private Long id;

    /** 学生名字 */
    @ApiModelProperty("学生名字")
    @Pattern( regexp= "^.{6}$",groups = {UpdateMode.class,InsertMode.class},message = "臭弟弟")
    private String name;

    /** 年龄 */
    @ApiModelProperty("年龄")
    @Excel(name = "年龄")
    private Integer age;

    /** 性别 */
    @ApiModelProperty("性别")
    @Excel(name = "性别")
    private String sex;

    /** 班级id外检 */
    @ApiModelProperty("班级id外检")
    @Excel(name = "班级id外检")
    private Long teamId;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setAge(Integer age) 
    {
        this.age = age;
    }

    public Integer getAge() 
    {
        return age;
    }
    public void setSex(String sex) 
    {
        this.sex = sex;
    }

    public String getSex() 
    {
        return sex;
    }
    public void setTeamId(Long teamId) 
    {
        this.teamId = teamId;
    }

    public Long getTeamId() 
    {
        return teamId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("age", getAge())
            .append("sex", getSex())
            .append("teamId", getTeamId())
            .toString();
    }
}
